package com.simple.core.exception;

import com.simple.core.enums.ResponseCode;
import lombok.Getter;

/**
 * @author : mocun
 * @since : 2023/3/11
 */

@Getter
public class BizException extends RuntimeException {

    private int code = ResponseCode.FAIL.getCode();

    public BizException(ResponseCode responseCode) {
        super(responseCode.getMessage());
        this.code = responseCode.getCode();
    }

    public BizException(String message) {
        super(message);
    }

    public BizException() {
        super(ResponseCode.FAIL.getMessage());
    }
}
